Support Codex and PiAgent runtimes in Studio agent loop - #1071
Open
FirstayZheng wants to merge 3 commits into
Open
Support Codex and PiAgent runtimes in Studio agent loop#1071FirstayZheng wants to merge 3 commits into
FirstayZheng wants to merge 3 commits into
Conversation
FirstayZheng
force-pushed
the
feat/studio-agent-loop-runtime
branch
from
September 9, 2026 03:13
aaba4fb to
af27fe5
Compare
FirstayZheng
force-pushed
the
feat/studio-agent-loop-runtime
branch
from
September 9, 2026 04:53
af27fe5 to
541b7b6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
Studio 创建多 Agent / LoopAgent 时需要支持 ADK、Codex、PiAgent 混合 runtime。PiAgent 云部署还遇到构建期和运行期二进制解析问题;LoopAgent 作为 root agent 时,Studio BFF tools 会因为 root 没有
.tools列表而初始化失败。变更
runtime="codex"和runtime="piagent",Codex 自动补充运行依赖。veadk.runtime.piagent.installer;当云端安装的是旧版 veadk、installer 不支持多 URL fallback 时,才执行内联安装脚本兜底。app.py会为 PiAgent runtime 设置PIAGENT_BINARY、PIAGENT_INSTALL_DIR、PIAGENT_AGENT_DIR默认值,避免 AgentKit 运行时没有继承 Dockerfile ENV 时回落到首次请求懒下载。PIAGENT_BINARY_URLS/PIAGENT_BINARY_BASE_URLS多源 fallback、聚合失败原因,并可复用镜像内/opt/piagent/pi/pi。.toolsorchestrator 时 Studio BFF tools 初始化抛错的问题,改为自动关闭 BFF tools。修复的问题
Studio BFF tools require an Agent with a tools list.验证
npm --prefix frontend run buildnpm --prefix frontend testnpm --prefix frontend run check:i18nnpm --prefix frontend run test:webui-assetsuv run pytest tests/cli/test_generated_agent_backend_codegen.py tests/cli/test_generated_agent_component_matrix.py tests/cli/test_generated_agent_backend_codegen_extended.py tests/integrations/agentkit/test_app.py tests/runtime/piagent/test_piagent_runtime.py tests/cli/test_frontend_deploy_errors.pyuv run pytest tests/cli/test_runtime_update_recovery.py tests/cli/test_studio_rbac.py -q -k 'runtime_update_recovery or legacy_runtime_capability_recovers_environment_and_agentkit_toolset or runtime_update_capability_restores_quick_mode_from_agent_draft_endpoint or runtime_update_capability_uses_safe_agent_draft_fallback'.env环境:uv run pytest tests/cli/test_runtime_update_recovery.py tests/cli/test_studio_rbac.py tests/cli/test_generated_agent_backend_codegen_extended.py tests/runtime/piagent/test_piagent_runtime.py tests/integrations/agentkit/test_app.py -q,286 passed / 1 skipped。uv run --with pyright pyright veadk/cli/generated_agent_codegen.py veadk/integrations/agentkit/app.py veadk/runtime/piagent/installer.pygit diff --checkuv run pre-commit run --all-filesr-yeuk31uha864rmgqpmqz(cn-beijing)PiAgent invoke 成功返回 OK;运行日志进入piagent runtime: starting pi rpc,没有再出现从 GitHub 懒下载 Pi 二进制。局限与后续
veadk.runtime.piagent.installer存在逻辑重复;这是为了兼容当前云端 PyPI 仍可能安装旧版veadk-python==1.1.9的情况。等增强后的 installer 发版并成为云端默认依赖后,可以删除内联脚本,改为只调用包内 installer。.tools的 orchestrator root 会自动关闭;如果后续希望给 LoopAgent root 直接挂 Studio tools,需要再设计工具路由语义。